		<!--任务页面的样式-->
<style>
.nav-tabs li{height: 50px;}
.reviewerDataBox{float:none;}
#nowlistpages .pagination{margin:5px 0; text-align:right;}
#nowlistpages .pagination a{margin:0; margin-left:1px;}
.memberDataBox, .reviewerDataBox, .followerDataBox{float:none;}
.task-sele{ min-width:50px;}
.task-sele .seleText{margin-top:3px; border-left:1.5px dashed #ddd; padding-left:27px;}
.task-sele .seleBox{ background:none; border:none; border-left:1px dashed #ddd; padding-left:27px;}
.task-sele .seleIcon{ background:none; color: rgba(0,0,0,0) !important; width:80px; text-decoration:none !important;}
.caret-up{ border-bottom:4px solid #999; border-top:0;}
.limit_h{ height:17px; overflow:hidden;}
.badge{position: absolute;background: red;right: -8px;top: -8px;z-index:5}
.diviLine{ border-left:1.5px dashed #ddd !important; }
.datepicker-custom{cursor:pointer !important; background:#fff !important;border:none; padding-left:10px !important; padding-right:0;}

.selectlist{margin:0; padding:0;}
.selectlist li{list-style-type:none; margin:0; padding:0;padding:5px; border-bottom:1px solid #eee; margin:0 8px;}
.selectlist li:hover{background:#eee;}
.selectlist li>ul>li:hover{background:#E7E7E7;}	
	
.specialline{color:#FF0000;}
.orderLine{clear: both;background: #fafafa;margin: 0 15px;padding: 5px 0;}  
.orderLine button{color:#999;}
.orderLine button:hover{ text-decoration:none !important; color:#000;}
th i{margin-left:1px;font-size:12px;}
.handshape{cursor:pointer}
.btnclick{background-color:#EBEBEB;}
.text-upload_create{display: inline-block;position: absolute;left:45px;cursor: pointer;z-index: 0;font-weight: bold;margin-top:2px;}


.iconic-input .content {padding-left: 30px !important;}


/*创建任务面板的选项*/
.menu-show{}
.menu-show:hover,.menu-show:focus{ display:block}
.menu-show input{ border-radius:2px !important;}
.menu-show li{ overflow:hidden; margin:5px 0;}
/*任务分类弹出菜单*/
.icon-remove{position: absolute;right: 10px;margin-top: -20px;color: red;cursor: pointer;}
.dropdown-menu a:hover +.icon-remove{ color:white;}
#formList a{ padding-right:30px;}



.navbar-nav{width:100%;float: right;background: #363636;border-radius:3px;}
.navbar-nav li{width: 11.11%;background:none;height: 38px;text-align: center;line-height: 38px;color: #fff;cursor: pointer;}
.navbar-nav li.oclick{background: #46c396 !important;position: relative;}
.navbar-nav li.oclick a:link{background: #46c396 !important;}
.navbar-nav li.oclick a:visited{background: #6dc5a3 !important;}
.navbar-nav li.oclick a:hover{background: #46c396 !important;}
.navbar-nav li.oclick a:active{background: #46c396 !important;}
.navbar-nav li i.triangle{border: 6px solid #46c396;display: block;width: 0;height: 0;border-left-color: transparent;border-right-color: transparent;border-bottom-color: transparent;position: absolute;bottom: -11px;left: 50%;margin-left: -3px;}
.navbar-nav li a{color:white;padding:0;line-height:38px;height:38px}/*padding-top:0; padding-bottom:15px;*/
.navbar-nav li a:hover{background:none;}

.iconic-input{border: 1px solid #aaa;}
.input-group-btn.dropdown{width:75px;}
.dropdown .caret{position: absolute;right: 5px;top: 16px;}
.input-group-btn.dropdown>.btn,.input-group-btn.dropdown>input,.input-group-btn.dropdown>.btn{border: 0;height: 34px; width: 100%;text-overflow: ellipsis;overflow: hidden;}

.input-none{border: 0;height: 34px; width: 100%;text-overflow: ellipsis;overflow: hidden;}
.input-none:hover,.input-none:focus{ border:none }

.input-control{font-size: 14px;margin: 6px 0;height: 23px;background: #fff; padding-right:15px;}
.tab-content>.tab-pane>.input-group>.icon-edit{margin: 10px 5px 8px 10px;}



.ztlist li{width:70px;height:30px;list-style:none;line-height: 30px;text-align: center;}
.planTitl{ padding:3px 10px; border-radius:10px; position:absolute;left:50%; margin-left:-50px; background:#6dc4a2;}
.planTitl1{ padding:3px 10px; border-radius:10px; position:absolute;left:50%; margin-left:-44px; background:#F85A57;}
.done{color:#F6574F;}
.red-star{font-size:12px !important;color:#D92D29}
.blue-star{font-size:12px !important;color:#3365FF}
.green-star{font-size:12px !important;color:#43E43F}
.yellow-star{font-size:12px !important;color:#E9A94A}
.muted-star{font-size:12px !important;color:#aaa}
.panel-body .table-striped tr td:nth-child(1) a{color: #aaaaaa;}
.panel-body .table-striped tr td:nth-child(2) a{color:#333946;}
.panel-body .table-striped tr td:nth-child(4) a{color: #333946;}
.panel-body .table-striped tr td:nth-child(5) a{color: #f50f04;}
.panel-body .table-striped tr td:nth-child(6) a{color: #333946;}
</style>
<div class='panel panel-default'>
    <section class='panel'>
        <header class='panel-heading custom-tab' style="height:40px">
            <ul class='nav nav-tabs' style="margin: -11px -15px -15px;">
                <li class='active'>
                    <a style='width: auto;height: 50px;padding: 0 15px !important;display: block;text-align: center;line-height: 50px;font-size: 16px;font-weight: normal;color: #696969 !important;margin-right: 0;' href='#task2' data-toggle='tab' data-position='bottom' data-intro='切换到我的工作空间'>我的工作</a>
                </li>
                <!--<li class=''>-->
                    <!--<a style='width: auto;height: 50px;padding: 0 15px !important;display: block;text-align: center;line-height: 50px;font-size: 16px;font-weight: normal;color: #696969 !important;margin-right: 0;' href='#integral' data-toggle='tab' onClick='setTimeout(function(){ $(window).trigger("resize");}, 50);' data-position='bottom' data-intro='切换到我的积分'>我的积分</a>-->
                <!--</li>-->
                <!--<li class=''>-->
                    <!--<a style='width: auto;height: 50px;padding: 0 15px !important;display: block;text-align: center;line-height: 50px;font-size: 16px;font-weight: normal;color: #696969 !important;margin-right: 0;' href='#list2' data-toggle='tab' onClick='setTimeout(function(){ $(window).trigger("resize");}, 50);' data-position='bottom' data-intro='切换到我的团队空间'>考勤</a>-->
                <!--</li>-->
            </ul>
        </header>
        <div class='panel-body'>
            <div class='tab-content'>
                <div class='tab-pane active' id='task2'>
                    <!--<div class="panel">-->
                        <!--<div class="panel-heading">-->
                            <!--暂未分配工作的人员-->
                           <!--<span class="tools pull-right">-->
                                <!--<a class="fa icon-times" href="javascript:;"></a>-->
                            <!--</span>-->
                        <!--</div>-->
                        <!--<div class="panel-body" style="color:#000">-->
                            <!--<div id="FlatTree" class="tree tree-plus-minus">-->
                                <!--<volist name="freeman" id="freeman">-->
                                    <!--{$freeman}-->
                                <!--</volist>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                    <div class="row" style="color:#000;padding:0 15px;clear:right; margin-bottom:15px;">
                        <!--<div class="col-lg-3 col-md-3 col-sm-12" style="float:left"><span style="color: #22b5e5;height: 38px;line-height: 38px;font-size: 16px;"><span style="font-size: 20px;color: #22b5e5;"><php>$arr=array('周日','周一','周二','周三','周四','周五','周六','周日','周一','周二','周三','周四','周五');echo $arr[date('w')];</php></span> <php> echo date('m').'月'.date('d').'日　'.date('Y').'年'</php></span></div>-->
                        <div class="col-sm-12 timeLine">
                            <ul class="nav navbar-nav" style="float:right; display:table;">
                                <li title="本月任务"><a  href="javascript:void(0);"  value="month">本月任务</a><i></i></li>
                                <li title="本周任务"><a  href="javascript:void(0);"  value="week">本周任务</a><i></i></li>
                                <?php $weekArr=range(0,6); 
                                	foreach($weekArr as $v){
                                        if(date('w')==$v){
                                        	$str='今天';
                                            $clickStr='oclick';
                                            $signStr='<i class="triangle"></i>';
                                        }else{
                                        	$str=$arr[$v];
                                            $clickStr='';
                                            $signStr='<i></i>';
                                        }
                                        echo('<li class="'.$clickStr.'"><a  href="javascript:void(0);"  value="'.($v-date('w')).'">'.$str.'</a>'.$signStr.'</li>');
                                    }
                                ?>
                                
                            </ul>
                        </div>
                        <div style="clear:both"></div>
                    </div>
                    <div class="f-taskbox">
                    			<if condition="getAccessMenu($accessList, 'Intesys', 'Task_daily', 'add')">
                                <form data-position="bottom" data-intro="这里可以发布任务" method="post" id="form1" role="form" class="form-horizontal myTaskForm col-xs-12" action="{:U('Task_daily/insert')}">
                                	<div class="row">
                                        <div class="col-xs-12">
                                            <div class="input-group m-bot15 iconic-input col-xs-12">
                                                <div class="col-xs-4 col-lg-6" style="padding-left:0;" data-position="bottom" data-intro="在这里填写任务内容">
                                                    <i class="fa icon-edit" style="font-size:16px;z-index: 3;color:#7DBEA6; padding-top:3px;"></i>
                                                    <input type="text" datatype="*" nullmsg="工作任务名称不能为空" errormsg="不支持特殊字符" style="border:none; border-radius:0;" class="form-control content" name="title" placeholder="请输入工作任务名称">
                                                    <div class="clearfix"></div>
                                                </div>
                                                <!--<div class="pull-right" style="color:#000;text-align:center;padding:0; height:34px; width:40px;" data-position="left" data-intro="展开可填写任务详细描述，上传文件，还可以发消息体现负责人">
                                                    <a  style="cursor:pointer;color:#65CEA7;text-decoration:none;text-align:center;display:block;margin-top:-7px" onclick="event.preventDefault();" id="btn-slide" title="展开/收起">
                                                        <i class="fa icon-sort-asc" style="font-size:24px;color:#65CEA7;text-align:center"></i>
                                                    </a>
                                                </div>-->
                                                <div class="pull-right task-sele" style="width:auto;height:36px; padding-left:0; position:relative;" data-position="left"  data-intro="选择任务负责人">
                                                    <i class="fa icon-user" style="z-index:3; font-size:14px; position:absolute; left:2px; color:#65CEA6; margin-top:10px;"></i>
                                                    <html:listselect class="btn btn-sm seleText" nullmsg="请选择负责人" datatype="*"  name="member" multiple="0" url="{:U('Member/selectText')}" title="负责人" id="myfollower"/>
                                                </div>
                                                <div class="input-group-btn input-large custom-date-range pull-right " style="width:114px;" data-position="left"  data-intro="设置任务截止时间">
                                                    <input placeholder="截止时间"  datatype="*" nullmsg="请选择时间" type="text" readonly class="input-control diviLine datepicker datepicker-custom input-none" name="realtime" id="realtime">
                                                    <label for="realtime"><i class="fa icon-calendar" onClick="$(this).prev().trigger('click');" style="z-index:3; font-size:14px; position:absolute; right:2px; color:#65CEA6; top:2px;"></i></label>
                                                </div>
                                                <div class="input-group-btn dropdown pull-right " data-position="bottom" data-intro="这里选择任务分类">
                                                    <button class="input-control diviLine dropdown-toggle typebtn input-none"  type="button" id="typebtn" data-toggle="dropdown">分类 <span class="caret"></span></button>
                                                    <ul class="dropdown-menu" id="formList"></ul>
                                                    <span class="tab_id"><!--新添加的分类--></span>
                                                </div>
                                                <div class="input-group-btn dropdown pull-right" data-position="bottom" data-intro="这里输入积分">
                                                    <button class="form-control dropdown-toggle intebtn input-none"  type="button" id="intebtn" data-toggle="dropdown">积分 <span class="caret"></span></button>
                                                    <ul class="dropdown-menu menu-show" id="inteList">
                                                    	<volist name="inteType" id="vo">
                                                        	<?php if($i>1){ ?>
                                                        		<li class="divider"></li>
                                                        	<?php } ?>
                                                            <li>
                                                                <label class="control-label col-xs-4">{$vo.remark}:</label>
                                                                <div class="col-xs-8">
                                                                	<input name="integral[{$vo.typename}]" datatype="*" type="number" placeholder="积分" nullmsg="错误，请输入{$vo.typename}积分。" class="form-control"/>
                                                                </div>
                                                            </li>
                                                        </volist>
                                                    </ul>
                                                    <div class="cover"></div>
                                                </div>
                                        		<div class="clearfix"></div>
                                            </div>
                                        	<div class="clearfix"></div>
                                        </div>
                                        <div style="clear:both"></div>
                                    </div>
                                    <div class="row">
                                    	<div id="fadein">
                                            <div class="col-md-12">
                                                <textarea placeholder="可输入任务内容" errormsg="内容不能为空" nullmsg="不支持特殊字符" rows="3" class="form-control" name="remark"></textarea>
                                            </div>
                                            <div  class="col-xs-12">
                                            	<div style="background:#fafafa; padding:6px 0;">
                                                    <div class="col-sm-4">
                                                    	
                                                        <!--<div style="clear:left;">
                                                        	<div class="text-upload_create">上传文件</div>
                                                            <iframe id="uploadiframe_create" name="uploadiframe_create" src="{:U('upload')}" appendto="#inputbox" style="height:25px; " class="uploadiframe text-left" filename="img_url[]"></iframe>
                                                        </div>-->
                                                        
                                                    </div>
                                                    <div class="col-sm-8">
                                                        <button type="submit" style="padding: 3px 12px; margin-top:2px;" class="btn btn-sm btn-success pull-right" data-position="left"  data-intro="点击即可发布" id="submit"> 发布 </button>
                                                        <!--<label class="pull-left control-label text-muted" style="padding-right:10px;">消息提醒:</label>-->
                                                        <div class="icheck minimal  text-muted">
                                                            <?php foreach(C('MSG_TYPE_TEXT') as $k=>$v){ ?>
                                                                 <div class="square-red pull-right">
                                                                    <label class="checkbox-inline " style="transform:scale(0.8)">
                                                                      <input type="checkbox" class="" value="{$k}" name="mode[]">{$v}
                                                                    </label>
                                                                 </div>
                                                            <?php } ?>
                                                        </div>
                                                    </div>
                                                	<div class="clearfix"></div>
                                                </div>
                                            </div>
                                            <div class="col-xs-12" style=" padding:10px 0;">
                                                <div id="inputbox" class="dropzone"></div>
                                            </div>
                                        	<div style="clear:both"></div>
                                        </div>
                                    </div>
                                        <div style="clear:both"></div>
                                </form>
                                </if>
								<form action="{:U('formList')}" method="post" id="formListform"></form>
                                <!--<div class="col-lg-12 col-md-12" style="border:1px dashed #c1c1c1;color:#000;border-radius:2px 2px 2px 2px;text-align:center;padding:18px 0;clear:right">-->
                                    <!--<p>这里能看到自己每天的工作任务安排和执行情况，您可以：</p>-->
                                    <!--<p>1.在本页填写今日工作安排</p>-->
                                    <!--<p>2.在<a href="#">计划表</a>填写每周/每月工作任务</p>-->
                                <!--</div>-->
     <!--------------------------------------------任务列表 开始--------------------------------------------------------->
                                <div class="orderLine">
                                    <form id="nowlistform" action="{:U('Task_daily/nowlist')}">
                                        <input type="hidden" name="time" value="{$time}">
                                        <input type="hidden" name="status" value="">
                                        <input type="hidden" name="type" value="">
                                        <input type="hidden" name="belong" value="">
                                        <input type="hidden" name="important" value="">
                                    </form>
                                    <form id="donelistform" action="{:U('Task_daily/donelist')}"></form>
                                    <!--<div class="btn-group menu-box" style="margin-top: -3px;">
                                      <button data-toggle="dropdown" style="margin-right: 16px;font-size: 12px;color: #aaaaaa; border: 0; padding: 0;" class="btn btn-default dropdown-toggle" type="button" id="btnGroupDrop1">
                                          <span class="menu-name">状态</span>
                                          <span class="menu-value"></span>
                                          <span class="caret"></span>
                                      </button>
                                      <ul aria-labelledby="btnGroupDrop1" role="menu" class="dropdown-menu" id="status">
                                          <li><a href="javascript:void(0)">已驳回</a></li>
                                          <li><a href="javascript:void(0)">未开始</a></li>
                                          <li><a href="javascript:void(0)">进行中</a></li>
                                          <li><a href="javascript:void(0)">待审核</a></li>
                                          <li><a href="javascript:void(0)">待评分</a></li>
                                          <li><a href="javascript:void(0)">已通过</a></li>
                                        </ul>
                                    </div>-->
                                    <notempty name="table">
                                        <div class="btn-group menu-box">
                                          <button data-toggle="dropdown" class="btn btn-link btn-sm dropdown-toggle" type="button" id="btnGroupDrop2">
                                              <span class="menu-name" style="padding-left:5px;">分类</span>
                                              <span class="menu-value"></span>
                                              <span class="caret"></span>
                                          </button>
                                          <ul aria-labelledby="btnGroupDrop2" role="menu" class="dropdown-menu" id="type">
                                              <volist name="table" id="taba">
                                                  <li><a href="#" value="{$taba['id']}">{$taba['title']}</a></li>
                                              </volist>
                                          </ul>
                                        </div>
                                    </notempty>
                                    <div class="btn-group">
                                      <button class="btn btn-link btn-sm f-order" type="button" id="timeOrder">
                                          <span class="menu-name" style="padding-left:5px;">时间排序</span>
                                          <span class="menu-value"></span>
                                          <span class="caret"></span>
                                      </button>
                                      <ul class="hidden">
                                      	<li><a name="date" value="1"></a><li>
                                      </ul>
                                    </div>
                                    <div class="btn-group">
                                      <button class="btn btn-link btn-sm f-order" type="button" id="progressOrder">
                                          <span class="menu-name" style="padding-left:5px;">进度排序</span>
                                          <span class="menu-value"></span>
                                          <span class="caret"></span>
                                      </button>
                                      <ul class="hidden">
                                      	<li><a name="progress" value="1"></a><li>
                                      </ul>
                                    </div>
                                   <!-- <div class="btn-group menu-box" style="margin-top: -3px;">
                                        <button style="    margin-right: 16px;font-size: 12px;  color: #aaaaaa; border: 0; padding: 0;" data-toggle="dropdown" class="btn btn-default dropdown-toggle" type="button" >
                                            <span class="menu-name">责任人</span>
                                            <span class="menu-value"></span>
                                            <span class="caret"></span>
                                        </button>
                                        <ul aria-labelledby="btnGroupDrop2" role="menu" class="dropdown-menu" id="belong">
                                            <li><a href="#" value="1">由我执行</a></li>
                                            <li><a href="#" value="2">由我发布</a></li>
                                            <li><a href="#" value="3">由我参与</a></li>
                                        </ul>
                                    </div>
                                    <a href="javascript:void(0)" value='1' class="important" style="color:#3365FF">轻</a>
                                    <a href="javascript:void(0)" value='2' class="important" style="color:#43E43F">缓</a>
                                    <a href="javascript:void(0)" value='3' class="important" style="color:#E9A94A">重</a>
                                    <a href="javascript:void(0)" value='4' class="important" style="color:#D92D29">急</a>-->
                                        <div style="clear:both"></div>
                                </div>
 <!----------------------------------------------------------------nowlist--------------------------------------->
                                <div class="panel-body" data-position="bottom" data-intro="任务发布成功后这里可以查看" style="clear:left" >
                                    <div class="planTitl" style="color:white">当前任务 >></div>
                                    <hr style="clear:left;margin:15px 0 35px" />
                                    <div id="nowlist"></div>
                                </div>
                                <div id="nowlistpages" class="text-center"></div>
                                <!-------------------------------------任务列表结束----------------------------------------------------->
                                <!------------------------------------------完成任务表开始----------------------------------------------------------->
                                <div class="panel-body"  data-position="top" data-intro="任务完成后在这里显示" id="donelist"></div>
                                <div id="donelistpages" class="text-center"></div> 
                                <!---------------------------------------------完成任务结束-------------------------------------------------->
                        <!-- 数据主体 -->
                        
                    </div>
                </div>
                <!--我的积分 start-->
                <div class="wrapper tab-pane" id="integral" style="color:#000;padding:0;padding-top:15px;"></div>
                <!--我的积分  end-->
                <div class="wrapper tab-pane" id="team2" style="color:#000" ><!--tab-pane -->
                    <div class="col-lg-3"  style="padding:0" >
                        <form action="{:U('Analysis/chartlist')}" id="myteamform">
                            <div class="panel whitebg  midpanel"   style="margin:0">
                                <header class="panel-heading"> 时间 </header>
                                <div class="panel-body">
                                    <div class="m-bot15">
                                        <input class="form-control" name="time" readonly  style="cursor:pointer;display: inline; width:auto;margin-bottom:5px" value="" placeholder="查询日期" type="text" id="datepicker">
                                    </div>
                                </div>
                            </div>
                        </form>
                        <div class="panel botpanel" style="padding:0;margin:0">
                            <header class="panel-heading"> 选择人员 </header>
                            <div class="panel-body">
                                <html:dropdownselect class="memberselect" listloaded="listloaded" selected="" name="member" style="height:auto; width:auto;" multi="0" action="{:U('Team/membergroup')}" title="选择员工" placeholder="点击选择人员" />
                                <div id="reselectlayout" style="top:0; display:none; left:0; bottom:0; right:0; position:fixed; z-index:4999;"></div>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-9 panel-body" style="padding:0" id="myteam">
                    </div>
                </div>
                <div class="wrapper tab-pane" id='list2' style="color:#000;padding-right:0;padding-left:0;" >
                        <div class="col-lg-12" style="padding-top:10px;padding-bottom:10px;">
                            <if condition="$isadmin eq 1">
                                <div class="pull-right col-lg-2">
                                    <html:dropdownselect class="posselect" listloaded="listonload" selected="" name="pos" style="height:auto; width:120px;" multi="0" action="{:U('Team/positionlist')}" title="选择部门" placeholder="点击选择部门" />
                                    <div id="reselectposlayout" style="top:0; display:none; left:0; bottom:0; right:0; position:fixed; z-index:4999;"></div>
                                </div>
                                <div class="pull-right" style="line-height: 35px;">
                                    部门:
                                </div>
                            </if>
                            <form action="{:U('Task_daily/attendence')}" id="myajaxform" method="post">
                                <input type="hidden" name="position_id" value="">
                                <input type="hidden" name="timetype" value="0">
                                <input type="hidden" name="type" value="">
                                <div class="pull-right" style="margin-right:15px">
                                    <label for="datepicker1" style="padding-right:20px;font-weight:normal">时间范围:</label><input class="form-control datepicker" name="time" readonly  style="cursor:pointer;display: inline-block; width:auto;margin-bottom:5px" value="" placeholder="查询日期" type="text" id="datepicker1">
                                </div>
                            </form>
                            <div class="clearfix"></div>
                        </div>
                        <div class="col-lg-12">
                            <div class="pull-left btn-group" id="btn">
                                <button class="btn btn-default btnclick" type="button" style="border-bottom-left-radius:0;width:82px;border-bottom:none;">月</button>
                                <button class="btn btn-default" type="button" style="border-bottom-right-radius:0;width:91px;border-bottom:none;">年</button>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    <div class="col-lg-12" id="myajax">
                    </div>
                    <div id="myajaxpages" class="text-center">
                    </div>
                </div>
            </div>
        </div>
    </section>
    <div class="panel-body" style="padding:0">
        <div class="loading hidden">正在加载</div>
        <!--<div class="PagesBox"><?php echo $pages;?></div>-->
    </div>
</div>

<script src="__PUBLIC__/Intesys/AdminX/js/task-daily-index.js"></script>
<script src="/Public/Intesys/AdminX/js/nestable/jquery.nestable.js"></script>
<script>
//当点击分类菜单
$("#formList").click(function(e) {
	//如果点击的对象为.icon-remove，则移除
	if(e.target&&$(e.target).hasClass('icon-remove')){
		e.preventDefault();
		var _this=$(e.target);
		var data={'id':_this.parent().val()};
		$.getJSON('{:U('deleteform')}',data,function(data){
			if(data&&data.status){
				_this.parent().remove();
			}
		});
		$('#typebtn').html("分类 <span class='caret'></span>");
	}
});
$(".intebtn").click(function(e) {
    $("#inteList").show();
	setTimeout(function(){
		$("#inteList input:eq(0)").focus();
	},10);
});
$("#inteList input").focus(function(e) {
	clearTimeout(window.time);
    $("#inteList").show();
}).blur(function(e) {
	window.time=setTimeout(function(){
    	$("#inteList").hide();
	},10);
});;
//上传附件
/*$("#fadein .text-upload_create").click(function(e) {
	document.getElementById('uploadiframe_create').contentWindow.$(".dropzone").click();
});*/
//加载提示红点
<?php foreach($remind as $k=>$v){
	if($v>0){ ?>
		$(".timeLine li a[value='<?php echo $k ?>']").append('<span class="badge"><?php echo $v; ?></span>');	
<?php	}
}?>
$('.datepicker').datepicker({ dateFormat: 'yy-mm-dd' });
$('#datepicker').datepicker({ dateFormat: 'yy-mm-dd' });
function listonload(){
	$('.posselect').blur(function(){
		$("#myajaxform input[name='position_id']").remove();
		if($('.posselect.binded .itemspan').length!=0){
			$('#myajaxform').append("<input type='hidden' name='position_id' value='"+$('.posselect .itemspan').children("input:eq(1)").attr('value')+"'>");
		}
		$('#myajaxform').submit();
	});
}
function listloaded(){
	$('.memberselect .selectitem').click(function(){
		if($(this).prev('em').length!=0){
			$(this).find('input').eq(0).attr('name','pos_name');
			$(this).find('input').eq(1).attr('name','pos_id');
		}else{
			$(this).find('input').eq(0).attr('name','member_name');
			$(this).find('input').eq(1).attr('name','member_id');
		}
	});
	$('.memberselect').blur(function(){
		$("#myteamform input[name='member_pos_id']").remove();
		$("#myteamform input[name='member_member_id']").remove();
		if($('.memberselect .itemspan').children('input:eq(1)').length!=0){
			$('#myteamform').append("<input type='hidden' name='"+$('.memberselect .itemspan').children("input:eq(1)").attr('name')+"' value='"+$('.memberselect .itemspan').children("input:eq(1)").attr('value')+"'>");
		}
		$('#myteamform').submit();
	});
}
//验证表单
$(".myTaskForm:eq(0)").Validform({
	ajaxPost:true,
	tiptype:function(msg, s, data){
		$.ThinkBox.error(msg,{'delayClose':1000,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
		
	},
	datatype:{
		"text":function(gets,obj,curform,regxp){
			return true;
		},"image":function(gets,obj,curform,regxp){
			return true;
		}
	},
	callback:function(data){
		$('#nowlistform').submit();
		$('#typebtn').html("分类 <span class='caret'></span>");
		$("#inputbox").empty();
		$("#timeOrder").click();
		//检测登录
		$('.ThinkBox-close').trigger('click');
		if(data.status == 0){
			$.ThinkBox.error(data.info,{'delayClose':200});
		}else{
			$('#form1')[0].reset();
			$.ThinkBox.success('操作成功',{'delayClose':2000,modal:false, 'close': '关闭',x:0,y:0,center:false,locate:['left','top'], show:['',0]});
		}
	}
});
//当添加完分类之后的回调
function addform(){
    $.ajax({
        url: "{:U('newType')}",
        datatype:'json',
        success: function(data){
            data=JSON.parse(data);
            $('.tab_id').html("<input type='hidden' name='type_id' value="+data.id+"><input type='hidden' name='type_name' value="+data.title+">");
            $('#typebtn').html(data.title+' <span class="caret"></span>');
        }
    });
	$("#formListform").submit();
}
$('#formList').ajaxlist();
//表格分类列表 start
$('#nestable_list_3').ajaxlist({success:function(){
	if($('#nestable_list_3 li').length == 0){
		$('#nestable_list_3').html('<div style="padding:10px; text-align:center;">暂无分类</div>');
	}
	Nestable1();
	$('.dd3-content .btn-group').css('display','none');
}});
//表格分类列表 end
$('#myteamform .icheck input').change(function(e) {
	$('#myteamform').submit();
});
$('#datepicker').change(function(){
	$('#myteamform').submit();
});
$(".checkoutform:eq(0)").Validform({
	ajaxPost:true,
	tiptype:function(data,s){
		if(s.type == 1){
		}
	},
	datatype:{
		"text":function(gets,obj,curform,regxp){return true;},
		"image":function(gets,obj,curform,regxp){return true;}
	},
	callback:function(data){
		$('#nowlistform').submit();
		$('#typebtn').html("分类 <span class='caret'></span>");
		$('#form1')[0].reset();
	}
});

$('#nowlist').ajaxlist();
$('#donelist').ajaxlist();
$(document).ready(function() {
	//当点击筛选条件时上面显示选中的字	
	$(".menu-box li a").click(function(e) {
		$(".menu-box .menu-value").html('');
		$(".menu-box .menu-name").show();
		var box=$(this).parents(".menu-box");
		box.find(".menu-name").hide();
		box.find(".menu-value").html($(this).text());
	});
	//当点击筛选条件的排序
	$(".f-order").click(function(e) {
		$(this).find(".caret").toggleClass("caret-up");
		var data=$(this).next().find("li a");
		var obj=$("#nowlistform input[name='"+data.attr('name')+"'");
		if(obj.val()==1){
			$(".f-orderItem").remove();
			$("#nowlistform").append("<input class='f-orderItem' type='hidden' name='"+data.attr('name')+"' value='0'/>");	
		}else{
			$(".f-orderItem").remove();
			$("#nowlistform").append("<input class='f-orderItem' type='hidden' name='"+data.attr('name')+"' value='1'/>");	
		}
		$("#nowlistform").submit();
	});
	$('.wysihtml5').wysihtml5();
	$('#hiddentype div a').each(function(){
		$(this).click(function(){
			var hidspan=$('#hidspan').attr('value');
			var abtn=$(this).attr('value');
			$.post("{:U('Task_daily/editType')}",{id:hidspan,type_id:abtn},function(data){
				alert(data);
				$('#nowlistform').submit();
				$('#hiddentype').css('display','none');
			});
		});
	});
	$(document).click(function(){
		$('#hiddentype').css('display','none');
	});
	$.post("{:U('Task_daily/donelist')}",function(data){
		$('#donelist').html(data.tbody);
	},'json');
	$.post("{:U('Task_daily/nowlist')}",function(data){
		$('#nowlist').html(data.tbody);
	},'json');
	$.post("{:U('Analysis/chartlist')}",function(data){
		$('#myteam').html(data.tbody);
	},'json');
	$.post("{:U('Task_daily/integral')}",function(data){
		$('#integral').html(data.tbody);
	},'json');
});

$('#myteam').ajaxlist();
$('#myajax').ajaxlist();
$('#datepicker1').datepicker({ dateFormat: 'yy-mm' });
$('#datepicker1').change(function(){
	$('#myajaxform').submit();
});
$('#btn button').each(function(){
	$(this).click(function(){
		$("#myajaxform input[name='timetype']").val($(this).index());
		$('#myajaxform').submit();
	});
});
//渲染ICHECK
$('.square-red input').iCheck({
	checkboxClass: 'icheckbox_square-red',
	radioClass: 'iradio_square-red',
	increaseArea: '20%'
});
$('#btn button').each(function(){
	$(this).click(function(){
		$('#btn button').removeClass('btnclick');
		$(this).addClass('btnclick');
	});
});
$(window).trigger('load');
//火狐浏览器下输入框无法获得焦点
$("#form1").find('input:eq(0)').parent().click(function(){  $(this).find('input').focus();  });
$("#form1").find('textarea').parent().click(function(){  $(this).find('textarea').focus();  });
</script>